home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / program / misc / fpl-v13.lha / fpl / src / COMPILING < prev    next >
Text File  |  1995-02-22  |  9KB  |  176 lines

  1. /************************************************************************
  2.  *                                                                      *
  3.  * fpl.library - A shared library interpreting script langauge.         *
  4.  * Copyright (C) 1992-1994 FrexxWare                                    *
  5.  * Author: Daniel Stenberg                                              *
  6.  *                                                                      *
  7.  * This program is free software; you may redistribute for non          *
  8.  * commercial purposes only. Commercial programs must have a written    *
  9.  * permission from the author to use FPL. FPL is *NOT* public domain!   *
  10.  * Any provided source code is only for reference and for assurance     *
  11.  * that users should be able to compile FPL on any operating system     *
  12.  * he/she wants to use it in!                                           *
  13.  *                                                                      *
  14.  * You may not change, resource, patch files or in any way reverse      *
  15.  * engineer anything in the FPL package.                                *
  16.  *                                                                      *
  17.  * This program is distributed in the hope that it will be useful,      *
  18.  * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
  19.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                 *
  20.  *                                                                      *
  21.  * Daniel Stenberg                                                      *
  22.  * Ankdammsgatan 36, 4tr                                                *
  23.  * S-171 43 Solna                                                       *
  24.  * Sweden                                                               *
  25.  *                                                                      *
  26.  * FidoNet 2:201/328    email:dast@sth.frontec.se                       *
  27.  *                                                                      *
  28.  ************************************************************************/
  29.  
  30. COMPILING
  31. =========
  32.  
  33.  All versions:
  34.  -------------
  35.    FPL has been developed on Amiga and under AIX (IBM's UNIX version) using
  36.  SAS/C development system version 6 and the internal AIX `cc' compiler combined
  37.  with the `xcdb' debugger.
  38.  
  39.    The FPL source code is highly portable. Source code packages I've received
  40.  during my life with programming, have often turned out to be hard to compile,
  41.  contained innumerous errors and the only conclusion you do is that the
  42.  distributed source code is not the same one that created the executable. This
  43.  is *NOT* a source code package like that. FPL is written in ANSI C and the
  44.  source code distributed is the only source used when FPL was compiled. Using
  45.  SAS/C on Amiga and the standard `cc' (or perhaps `gcc') under UNIX will
  46.  compile error free! Use 'ANSI' option with any other compiler to achieve best
  47.  possible result!
  48.  
  49.    If you add or change anything major when porting, please send a copy of that
  50.  to me to apply in the original FPL package.
  51.  
  52.    All versions are easily tested. Try running `SFPL demo.FPL' and if that
  53.  works, you know that _most_ of FPL is working.
  54.  
  55.    Using the `DEBUG' define activates a lot of extra checking and debugging
  56.  possibilities. Combined with the MEMORY_COOKIE define in "script.h", a good
  57.  piece of memory writing checks is performed. The `MEMORY_QUEUE' enbles the
  58.  memory queuing system. (Though I've found out some kind of bug somewhere in
  59.  the code within the DEBUG symbol... :()
  60.  
  61.    FPL runs and depends a lot on eight bit characters. Other character sets is
  62.  easily supported by changing the defines in "script.h", but modifying it to
  63.  other than eight bit characters will give you hard and boring work!
  64.  
  65.    Compilers not supporting ANSI C will have a hard time compiling this!
  66.  
  67.  Amiga version:
  68.  --------------
  69.    Assign FPL: to the FPL directory before compiling.
  70.  
  71.    You can make two version of the fpl.library, or more specificly one
  72.  library version and one standard executable file version.
  73.  
  74.  The development of this started using SAS/C v5.10 and since that lacked proper
  75.  library debugging features, I inserted some `#ifdef's and `#define's in the
  76.  source so that I could create both a library version and a version done as
  77.  a common executable for debugging. As you can see in the Makefile, the
  78.  define `SHARED' constructs the library.  Just a 'make' will create the
  79.  library, while a 'make FPL' will create the executable.
  80.  
  81.    The library version is using low level assembler routines for stack
  82.  allocating/expanding/swapping (I got initial help from Kjell Ericson to make
  83.  those as good as they are today).
  84.  
  85.    Some people have experienced troubles when trying to compile this. I can't
  86.  understand why!
  87.  
  88.    Compiling the executable file version will visualize a warning 205
  89.  (`macro may have side effects' or something like that), but don't bother,
  90.  the macro it warns about is perfectly safe.
  91.  
  92.    __inline has been used in a few places to make the `Global Optimizer'
  93.  inline those functions in the code.
  94.  
  95.    If you're trying to compile this without the SAS/C compiler, you will hit
  96.  some troubles, but nothing that you shouldn't be able to overcome!
  97.  
  98.  UNIX versions:
  99.  --------------
  100.    I have compiled FPL 11.1 under SVR4 UNIX without any kind of problems,
  101.  though I have a lot of projects to work on and my time is limited and I'll
  102.  bet there are more UNIX flavours than a signed char hand handle...!
  103.  
  104.    I spent many hours on this project writing the program under UNIX. The
  105.  source features a small number of `#ifdef's to make this possible.
  106.  The UNIX version I've used mainly is AIX, which is a mix of BSD and SVR4,
  107.  OSF/1 builts heavily upon it. The code is easily ported into other UNIX
  108.  environments. The UNIX version can also be compiled into a shared library! I
  109.  just don't know if it will work with anything but AIX, or not, but do try!
  110.  'make' will create the shared library 'libfpl.a' (in good old UNIX naming
  111.  standard) while 'make FPL' will build the executable version.
  112.  
  113.    I added (940314) the file 'Makefile.SVR4' which should compile FPL into a
  114.  shared library (libfpl.a) under any SVR4 UNIX!
  115.  
  116.    (I ported FPL to SunOS v4.1.1 and Dell Unix v2.2. The SUN `cc' compiler
  117.  promptly refuses some things (like the Data structure members which are
  118.  function pointers, DaSt's note), so I used the GNU `gcc' compiler instead.
  119.  The Dell Unix (SVR4) works like a charm, but will give a silly little warning
  120.  for the '\a'. You can safely ignore it. / BjSt)
  121.  
  122.    Compiling FPL v6.0 under SunOS 4.1.X did result in segmentation fault.
  123.  Define VARARG_FUNCTIONS for SunOS compilings!
  124.  
  125.  OS/2 version:
  126.  -------------
  127.    Since the 12th of February 1994, I include makefile.os2 and "FPL.def" file
  128.  in the FPL package to enable compiling FPL into a DLL (shared library) under
  129.  OS/2. The IBM C-Set/2 compiler does complain a *LOT* on using bitwise
  130.  operators on signed integers, but what can I do? I want bitwise operators on
  131.  signed integers!!
  132.  
  133.  DOS version:
  134.  ------------
  135.    I actually thought of making one. Then I tried Turbo C and discovered that
  136.  it doesn't look upon a single byte 10 as a newline character. That, plus the
  137.  fact that DOS compilers too often think in terms of 16-bit made me skip all
  138.  further efforts. Later modifications of FPL such as turning `int' into `long'
  139.  throughout the entire source code has enhanced DOS porting possibilities, but
  140.  is there really anyone who can do anything _serious_ with MS-DOS?!?.
  141.  
  142.  New versions:
  143.  -------------
  144.    Use `#ifdef's extensively and do not modify any part of the source code
  145.  that do not affect the system you're fixing it to run under.
  146.  
  147. MAKEFILE
  148. ========
  149.  
  150.    This package includes Makefile.AIX for AIX specific options, smakefile
  151.  for the Amiga SAS/C compiler, Makefile.OS2 for the OS/2 version,
  152.  Makefile.SVR4 to make a shared library under any SVR4 UNIX with 'gcc' and
  153.  finally Makefile.FILE which compiles with 'gcc' into simple link-objects
  154.  (I've used this to compile FPL under SunOS 4).
  155.  
  156. SOURCE CODES
  157. ============
  158.  
  159.    The source has been coded with great thought of program performance. It's
  160.  not easy to understand but I have done my best adding comments all over the
  161.  place. If you try to read and/or understand it, get in touch for better
  162.  explanations to things...
  163.  
  164. INCLUDE FILES
  165. =============
  166.  
  167.    The "FPL.h" is in two places in the archive, but that is because of the
  168.  convinience of having it in the source directory and I really couldn't
  169.  leave it out of the include directory tree!
  170.    The include tree is very Amiga infected, I know, but I don't have the
  171.  energy to change that fact at the moment. Following updates might change!
  172.  
  173.    When using the Amiga version you have to copy the files from the include
  174.  directory to INCLUDE:. If you're using any other system, those files won't be
  175.  needed.
  176.